import { gsap } from "gsap";

const ANIMATIONS = {
    showDiagnosisResult(app) {
        app.isDiagnosisResultShow = true;

        gsap.to(app, {
            diagnosisResultOpacity: 1,
            duration: 0.3
        });
    },

    hideDiagnosisResult(app) {
        gsap.to(app, {
            diagnosisResultOpacity: 0,
            duration: 0.3,
            onComplete: () => {
                app.isDiagnosisResultShow = false;
            }
        });
    },

    showDiagnosisDetail(app) {
        app.isDialogShow = true;

        gsap.to(app, {
            dialogOpacity: 1,
            duration: 0.3
        });
    },

    closeDiagnosisDetail(app) {
        gsap.to(app, {
            dialogOpacity: 0,
            duration: 0.3,
            onComplete: () => {
                app.isDialogShow = false;
            }
        });
    }
};


export default ANIMATIONS;